<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<%@ page import="com.colabo.j2ee.web.oaf.monitorperspective.action.SecurityStrategyViewAction" 
%>
<%
	SecurityStrategyViewAction action = new SecurityStrategyViewAction();
	String securityStrategyGroup = action.loadSecurityStrategyGroup();
	
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Security Strategy Group View</title>
<script type="text/javascript">

    new MUI.List({
        container:'securityStrategyGroupListWrapper',
        showCheckBox:false,
        width:250,
        height:100,
        id:'securityStrategyGroupList',
        items:<%=securityStrategyGroup%>,
        columns:[
            {text:'安全策略组',name:'groupName','tipText':'groupName'},
            {text:'启用',name:'isdefault','type':'checkbox'}
        ],
        commands:[
            {'text':'设置','name':'config','image':'resources/images/icons/16x16/cog.gif'}
        ],
        onItemCommand: function(item,self,cmd,img) {
            
            if ('ssDetailConfig') {
                var groupName = Url.encode(item.groupName);
                var draftGroupName = item.groupName;
            	MUI.securitystrategyDetailConfigWindow('monitorperspective/securitystrategydetailconfig.jsp?selectedGroupName='+groupName,
            			draftGroupName);
            }
        },
        onItemChecked: function(item,self,cmd,img) {
            alert('receieved onItemChecked command on item ' + item.value);
        },
        onItemSelected: function(item,self,cmd,img) {
            if (item.isDefault == 'false') {
				item.isDefault= 'true';
            } else {
				item.isDefault='false';
                }
            alert('receieved onItemSelected command on item ' + item.isdefault);
        },
        onItemColumnBound: function(item,self,col,td) {
        }
    });
</script>
</head>
<body>
<div id="securityStrategyGroupListWrapper" ></div>
</body>
</html>